const { Schema, model } = require('mongoose');
const moment = require('moment');

const logsSchema = new Schema({
  state: Number,
  time: {
    type: String,
    default: moment().format('YYYY/MM/DD hh:mm:ss')
  },
  adminsId: {
    type: Schema.Types.ObjectId,
    ref: 'adminsModel'
  }
}, { versionKey: false });
const logsModel = model('logsModel', logsSchema, 'logs');

module.exports.logsModel = logsModel;